package com.kun.service;

import java.util.List;
import java.util.Map;

import com.kun.entity.User;
import com.kun.entity.UserExample;

public interface UserService {
	
	//public User selectUserByLogin(User user);
	
	public User selectUserByLogUsername(String username);
	
	public User selectUserByRealUsername(String username);
	
	public int updateUser(User user,UserExample uExample);
	
	public int updateUserAllInfo(User user);//更新整个user
	
	public int updateUserByIdSelective(User user);//根据部分更新
	
	public int updateUserSimpleInfoByUsername(String username,User user);//更新普通用户信息
	
	public User selectByPrimaryKey(String id);
	
	public int insertUser(User user);
	
	/**
	 * 分页条件查询
	 * */
	public Map<String,Object> selectAllUser(int begin,int length,String jsonString,boolean isAuth);
	
	/**
	 * nickname or realname模糊查询 
	 * return List<userId>
	 * */
	public List<String> selectUserByLikeNicknameOrRealame(String nickname,String realname);
	
	/**
	 * only nickname查询id
	 * */
	public List<String> selectUserByLikeNickname(String nickname);
	
	public User selectUserByWechat(String openId);
	
	public List<String> selectUserByRealameAndIdcard(String realname,String idCard);
}
